import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Clase Piso sirve como referencia para saber si el heroe esta sobre "suelo"
 * 
 * @author (Gerardo Antonio Hernandez & Christian Israel Rodriguez Ahumada)
 * @version (29.06.2013)
 */
public class Piso extends BaseSolida
{
    /**
     * Act - do whatever the Plataforma wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    public void act()
    {
       // super.buscaHeroe();
    }
     /**
      *Revisa la posicion del heroe 
      */
     public void posicionHeroe()
     {
         if(super.getHeroe()!=null)
         {
             
             if(super.getHeroe().getY()>=this.getY())
                 super.getHeroe().cambiaBanderaCaer(true);
             else
             {
                 super.getHeroe().cambiaBanderaCaer(false);
 
                 if((super.getHeroe().getY())<(this.getY()))
                 {
                     super.getHeroe().setLocation(super.getHeroe().getX(),(this.getY()+18));
                 }
            }
         }
     }

    }
